package com.spi.soconversion.orders.conversion;

public enum FulfillmentType {
	CARRY("000001_Customer_P_CARRY","CASH_AND_CARRY"),
	DCPICK("000001_Customer_P_HBCDCPU",""),
	STOREPU("000001_Customer_P_STOREPU", ""),
	GND("000001_Home Deliv_T_GND", ""),
    STORESTOCK("000001_Home Deliv_T_STORESTOCK", "");

	private String code;
	private String displayText;
			
	private FulfillmentType(String code, String displayText) {
		this.code= code;
		this.displayText=displayText;
	}
	
	/**
	 * Get the fulfillment type
	 * @param cofiValue
	 * @return
	 */
	public static String getFullfillmentType(String cofiValue) {
		for (FulfillmentType ft : FulfillmentType.values()) {
			if (ft.code.equals(cofiValue)) {
				return ft.displayText;
			}
		}
		return null;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDisplayText() {
		return displayText;
	}

	public void setDisplayText(String displayText) {
		this.displayText = displayText;
	}
}
